package com.qf.business.student.controller;

import com.qf.commons.core.exception.ServiceException;
import com.qf.commons.data.result.AjaxResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: tiger
 * @Data: 2024/10/22 21:13
 * @Description: TODO
 **/

@Slf4j
@RestController
@RequestMapping("/stu")
public class StuController {

    @RequestMapping("/list")
    public AjaxResult list(int a) {
        log.debug("a - {}", a);
        log.info("a - {}", a);

        if (a < 0) {
            throw new ServiceException(403, "参数不正确");
        }

        return AjaxResult.success("学生列表");
    }
}
